#pragma once
#include "ImguiLayer.h"
#include "FysicsEngine/objects/Item.h"

namespace Fysics
{
	class EditorUI
	{
	public:
		static bool NewMenu(const char* menuName, float width, float height, 
			bool showTitle = true, bool canChangeSize = true, bool* closebtn = (bool*)0);
		static bool NewMenu(const char* menuName, float width, float height, float x, float y,
			bool showTitle = true, bool canChangeSize = true, bool* closebtn = (bool*)0);

		static void EndMenu();
		
		static bool Button(const char* label, void(*onclickCallBack)(), 
			float width = 180.f, float height = 30.f);

		static void List(const char* label, const std::vector<Item*>& items,
			int* rPointer);

		static bool TopMenuBar();
		static void TopMenuBarEnd();
		static bool Menu(const char* label);
		static void MenuEnd();
		static void MenuOption(const char* label, bool* isSelected);
		static void MenuOption(const char* label, void(*selectedCallBack)());

		static void Separator(const char* label);
		static void SetBackground(int color);

		static void OptionalButton(const char* label, const char* items, int* rPointer,
			void(*selectedCallback)(int index) = nullptr);

		static bool Dialog(const char* label, bool* exist);

		static void Text(const char* text);
		static void Text(const char* text, float R, float G, float B, float A = 1);
		static void InputBox(const char* label, char* textBuf, unsigned int bufLen = 128);
		static bool TreeNode(const char* title);
		static void TreePop();

		static void SliderFloat(const char* attrName, float* reference, float min, float max);
		static void SliderInt(const char* attrName, int* reference, int min, int max);
		static void DragFloat(const char* attrName, float* reference, float min, float max);

		static void SetSameLine();
		static void ShowDemo();
		static void Viewport();
		static void MessageArea();
	};
}
